package cn.kuporo.seckill.stock.application.model.command;

import lombok.*;

/**
 * @author: kuporo
 * @since: 2025/8/2
 * @description: 库存分桶
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SeckillStockBucketWrapperCommand extends SeckillStockBucketGoodsCommand{
    /**
     * 库存分桶信息
     */
    private SeckillStockBucketCommand stockBucketCommand;

    public SeckillStockBucketWrapperCommand(Long userId, Long goodsId, SeckillStockBucketCommand stockBucketCommand) {
        super(userId, goodsId);
        this.stockBucketCommand = stockBucketCommand;
    }

    public boolean isEmpty(){
        return this.stockBucketCommand == null
                || super.isEmpty()
                || stockBucketCommand.isEmpty();
    }
}
